export default {
  namespaced: true,
  state () {
    return {
      price: 50
    }
  },
  mutations: {
    updatePrice (state, m) {
      state.price += m
    }
  },
  actions: {
    updatePriceAfter (store, n) {
      setTimeout(() => {
        store.commit('updatePrice', n)
      }, 1000)
    }
  },
  getters: {
    a (state) {
      return state.price * 2
    }
  }
}
